/*
    Copyright (C) 2009 Modelon AB

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, version 3 of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package PR_models 
  model PlateReactor "plate reactor with concurrent (parallel) flow" 
    
    // the vector nspecies represents the reactants A and B and the product C
    // the current reaction is then A + B = C
    
    // n = 30, number of discretized elements
    
    parameter Integer inj_B_in_elem = 16;
    
    parameter Integer n=30 "discretization number";
    parameter Real V_reac = 4.1667e-4/n "V per element";
    parameter Real V_sp = 2*2.9e-4/n "V per element";
    parameter Real Aheat = 2*0.52*0.07398/n "A per element";
    
    parameter Real d=1000 "density";
    parameter Real cp=4180 "specific heat capacity";
    parameter Real k=3000 "convection heat transfer coeff";
    parameter Integer nspecies=3 "number of involving species";
    parameter Integer A=1 
    "The reactant A corresponds to the first element in the nspecies list";
    parameter Integer B=2 
    "The reactant B corresponds to the second element in the nspecies list";
    parameter Integer C=3 
    "The product C  corresponds to the third element in the nspecies list";
    parameter Integer nreac=1 "number of reactions involved";
    parameter Real Hr = 2*5.86e5 "enthalpy of formation";
    
    parameter Integer stoich_coeff_A = -2 "The stoichometric coefficient from the reaction formula, negative for reactants and positive for products";
    parameter Integer stoich_coeff_B = -4;
    parameter Integer stoich_coeff_C = 1;
    
    parameter Real rateK0 = 2e7 "The reaction constant k0";
    parameter Real Ea = 76000 "Activation energy";
    parameter Real R=8.31434 "Universal gas constant";
    parameter Real small=1e-9;
    parameter Real q_reac_limit=1e-7;
    parameter Real c_C_limit=1;
    
    parameter Real c_nom = 2391.9/50;
    parameter Real Jcf = Hr/(d*cp)*c_nom;
    parameter Real aU = k*Aheat/(d*cp);
    parameter Real Z = Ea*d*cp/(Hr*R*c_nom);
    
    parameter Real q_B_total = 10e-3/3600;
    parameter Real T_feedB = (273+20)/Jcf;
    parameter Real cooling_flow = 10.8/3/3600; 
    
    parameter Real factor_c = 1.7;
    parameter Real c_feedA = 1407*factor_c/c_nom; 
    parameter Real c_feedB = 11256*factor_c/c_nom;
    
    parameter Real q_A = 40e-3/3600;
    parameter Real u_B1_tau = 30 "time constant of injection flow dynamics";
    
    // Default initial conditions, no injections and everything is cold
    Real[n] Tr(start = 303*ones(n)/Jcf,max=(273+155)/Jcf*ones(n));
    Real[n] Tc(start = 293*ones(n)/Jcf);
    Real[n] cA(start = 2392/c_nom*ones(n)) "Conc A in reactor";
    Real[n] cB(start = 0*ones(n)) "Conc B in reactor";
    Real T_feedA(start= 303/Jcf);
    Real T_cool(start= 293/Jcf);
    Real u_B1(start = 0);
    Real u_B2(start = 0);
    Real ub1f1( start=0);
    Real ub1f2( start=0);
    Real ub1f3( start=0);
   
    Real[n] q_reac 
    "The total flow rate in each discretized part of the reactor";
    
    Real[n] q_B;
    
    Real q_cool_in "utility volume flow into pipe 2";
    Real Tr_in "Temperature of fluid at pipe 1 entrance";
    Real Tc_in "Temperature of fluid at pipe 2 entrance";
    Real c_A_in "Inlet concentration of reactant A at pipe 1 entrance";
    Real c_feedB_in "Injection concentration of reactant B, constant at each injection site";
    
    parameter Real af11 = -0.6465642069286;
    parameter Real af12 = -0.52235971683047;
    parameter Real af13 = 0.20092585654438;
    parameter Real af21 = 0.52235971683047;
    parameter Real af22 = -0.07798518562701;
    parameter Real af23 = 0.13233112279764;
    parameter Real af31 =  0.20092585654438;
    parameter Real af32 = -0.13233112279764;
    parameter Real af33 = -0.27545060744436;
     
    parameter Real bf1 = -101.272744990762;
    parameter Real bf2 = 23.164289092889;
    parameter Real bf3 = 16.745608714377;
     
    parameter Real cf1 =  101.272744990762;
    parameter Real cf2 = 23.164289092889;
    parameter Real cf3 = -16.745608714377;
     
    parameter Real df = 10000;
  
    Real u_B1_setpoint_f(start=0);
    Real ub2f1( start=0);
    Real ub2f2( start=0);
    Real ub2f3( start=0);
    Real u_B2_setpoint_f(start=0);
    
    Modelica.Blocks.Interfaces.RealInput u_B1_setpoint;
    Modelica.Blocks.Interfaces.RealInput u_B2_setpoint;
    Modelica.Blocks.Interfaces.RealInput u_TfeedA_setpoint;
    Modelica.Blocks.Interfaces.RealInput u_T_cool_setpoint;
  equation 
    der(ub1f1) = af11*ub1f1+af12*ub1f2+af13*ub1f3 + bf1*u_B1_setpoint;
    der(ub1f2) = af21*ub1f1+af22*ub1f2+af23*ub1f3 + bf2*u_B1_setpoint;
    der(ub1f3) = af31*ub1f1+af32*ub1f2+af33*ub1f3 + bf3*u_B1_setpoint;
    u_B1_setpoint_f = cf1*ub1f1+cf2*ub1f2+cf3*ub1f3 + df*u_B1_setpoint;
    
    der(ub2f1) = af11*ub2f1+af12*ub2f2+af13*ub2f3 + bf1*u_B2_setpoint;
    der(ub2f2) = af21*ub2f1+af22*ub2f2+af23*ub2f3 + bf2*u_B2_setpoint;
    der(ub2f3) = af31*ub2f1+af32*ub2f2+af33*ub2f3 + bf3*u_B2_setpoint;
    u_B2_setpoint_f = cf1*ub2f1+cf2*ub2f2+cf3*ub2f3 + df*u_B2_setpoint;
    
    der(u_B1) = 1/1*(u_B1_setpoint - u_B1);
    der(u_B2) = 1/1*(u_B2_setpoint - u_B2);
    der(T_feedA) = 1/2*(u_TfeedA_setpoint - T_feedA);
    der(T_cool) = 1/4*(u_T_cool_setpoint - T_cool);
    
    Tr_in = T_feedA;    // REAL INPUT !!!
    c_A_in = c_feedA;
    q_cool_in = cooling_flow;
    Tc_in = T_cool;
    c_feedB_in = c_feedB;
   
    q_B[1] = u_B1*q_B_total;
    q_B[2:inj_B_in_elem-1] = zeros(inj_B_in_elem-2);
    q_B[inj_B_in_elem] = u_B2*q_B_total;
    q_B[inj_B_in_elem+1:n] = zeros(n-inj_B_in_elem);
  
    q_reac[1] = q_A + q_B[1];
    
    der(Tr[1]) = 1/V_reac*(q_B[1]*T_feedB + q_A*Tr_in - q_reac[1]*Tr[1] + 
                 aU*(Tc[1] - Tr[1])  + V_reac*rateK0*exp(-Z/Tr[1])* 
                 cA[1]*cB[1]*c_nom);
    
    der(Tc[1]) = 1/V_sp*(-q_cool_in*Tc[1] + q_cool_in*Tc_in - 
                 aU*(Tc[1] - Tr[1]));
    
    der(cA[1]) = 1/V_reac*(q_A*c_A_in - q_reac[1]*cA[1] + 
                 stoich_coeff_A*V_reac*rateK0*exp(-Z/Tr[1])*  
                 cA[1]*cB[1]*c_nom);
    
    der(cB[1]) = 1/V_reac*(q_B[1]*c_feedB_in - q_reac[1]*cB[1] + 
                 stoich_coeff_B*V_reac*rateK0*exp(-Z/Tr[1])* 
                 cA[1]*cB[1]*c_nom);
    
    for i in 2:n loop
    q_reac[i] = q_A + sum(q_B[1:i]);
      
    der(Tr[i]) = 1/V_reac*(q_B[i]*T_feedB + q_reac[i-1]*Tr[i-1] - 
                 q_reac[i]*Tr[i] + aU*(Tc[i] - Tr[i]) + 
                 V_reac*rateK0*exp(-Z/Tr[i])*cA[i]*cB[i]*c_nom);
      
    der(Tc[i]) =  1/V_sp*(q_cool_in*(Tc[i-1] - Tc[i]) - aU*(Tc[i] - Tr[i]));
      
    der(cA[i]) = 1/V_reac*(q_reac[i-1]*cA[i-1] - q_reac[i]*cA[i] + 
                 stoich_coeff_A*V_reac*rateK0*exp(-Z/Tr[i])* 
                 cA[i]*cB[i]*c_nom);
      
    der(cB[i]) = 1/V_reac*(q_B[i]*c_feedB_in + q_reac[i-1]*cB[i-1] - 
                 q_reac[i]*cB[i] + stoich_coeff_B*V_reac*
                 rateK0*exp(-Z/Tr[i])* cA[i]*cB[i]*c_nom);
    end for;
  end PlateReactor;
  
  
  /*
  class PR
  u_T_cool_setpoint(lowerBound=(15+273)/(670/50),upperBound=(80+273)/(670/50));
  u_TfeedA_setpoint(lowerBound=(30+273)/(670/50),upperBound=(80+273)/(670/50));
  der(u_T_cool_setpoint)(lowerBound=-1.5/(670/50),upperBound=0.7/(670/50));
  der(u_TfeedA_setpoint)(lowerBound=-1.5/(670/50),upperBound=2/(670/50));
optimization
  grid(finalTime=fixedFinalTime(finalTime=150),nbrElements=150);
  minimize(lagrangeIntegrand=0.1*pr.cA[pr.n]^2*(2392/50)^2 + 0.001*pr.cA[1]^2*(2392/50)^2 + 0.001*pr.cA[pr.inj_B_in_elem]^2*(2392/50)^
2 + 0.1*0.25*pr.cB[pr.n]^2*(2392/50)^2 + 1*pr.u_B1_setpoint_f^2 + 1*pr.u_B2_setpoint_f^2 + 1*der(u_T_cool_setpoint)^2*(670/50)^2 + 1*d
er(u_TfeedA_setpoint)^2*(670/50)^2);
subject to
  pr.cB[1] <= 200/2392*50;
  pr.cB[pr.inj_B_in_elem] <= 400/2392*50;
end PR;
*/
  
  optimization PlateReactorOptimization (objective=cost,
                                         startTime=0,
                                         finalTime=150)
  
  	PlateReactor pr(u_T_cool_setpoint(free=true),
  	                u_TfeedA_setpoint(free=true),
  	                u_B1_setpoint(free=true),
  	                u_B2_setpoint(free=true));
  	                
  	parameter Real sc_u = 670/50 "Scaling factor";
    parameter Real sc_c = 2392/50 "Scaling factor";
  
  	Real cost(start=0);
  	
  equation
    der(cost) = 0.1*pr.cA[30]^2*sc_c^2 + 
                0.025*pr.cB[30]^2*sc_c^2 + 
                1*pr.u_B1_setpoint_f^2 + 
                1*pr.u_B2_setpoint_f^2 + 
                1*der(pr.u_T_cool_setpoint)^2*sc_u^2 + 
                1*der(pr.u_TfeedA_setpoint)^2*sc_u^2;
  
  constraint
  	pr.Tr<=(155+273)*ones(30);
    
    pr.cB[1] <= 200/sc_c;
    pr.cB[16] <= 400/sc_c;
  
    pr.u_B1_setpoint>=0;
    pr.u_B1_setpoint<=0.7;
    pr.u_B2_setpoint>=0;
    pr.u_B2_setpoint<=0.7;
    
    pr.u_T_cool_setpoint>=(15+273)/sc_u;
  	pr.u_T_cool_setpoint<=(80+273)/sc_u;
  	pr.u_TfeedA_setpoint>=(30+273)/sc_u;
  	pr.u_TfeedA_setpoint<=(80+273)/sc_u;
    
  	der(pr.u_T_cool_setpoint)>=-1.5/sc_u;
  	der(pr.u_T_cool_setpoint)<=0.7/sc_u;
  	der(pr.u_TfeedA_setpoint)>=-1.5/sc_u;
  	der(pr.u_TfeedA_setpoint)<=2/sc_u;
  end PlateReactorOptimization;
  
  
  annotation (uses(Modelica(version="2.2.1")));
  
  model platereactor_gen_initial 
    
     parameter Integer n = pr.n;
    
     output Real[n] output_Tr;
     output Real[n] output_Tc;
     output Real[n] output_cA;
     output Real[n] output_cB;
     //output Real output_cC_1;
   Real u_B2_setpoint = Table_uB2_case_1_mode_3.y;
   Real u_B1_setpoint = Table_uB1_case_1_mode_3.y;
   Real u_TfeedA_setpoint = Table_Tfeed_case_1_mode_3.y;
   Real u_T_cool_setpoint = Table_Tcool_case_1_mode_3.y;
    
    annotation (Diagram,
      experiment(StopTime=100),
      experimentSetupOutput(textual=true));
    PR_models.platereactor pr            annotation (extent=[-4,-16; 16,4]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed_case_1_mode_3(table=[0,308/
          13.41; 20,303/13.41; 1000,303/13.41]) 
      annotation (extent=[-78,-22; -58,-2]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_1_mode_3(table=[0,0.4621;
          70,0.4820; 1000,0.4820]) 
                     annotation (extent=[-74,16; -54,36]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_1_mode_3(table=[0,0; 70,
          0.45; 200,0.45]) 
                annotation (extent=[-74,46; -54,66]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_1_mode_3(table=[0,(314)/
          13.41; 30,(324)/13.41; 70,317/13.41; 1000,317/13.41]) 
      annotation (extent=[-80,-62; -60,-42]);
  equation 
    
    output_Tr = pr.Tr*pr.Jcf-273*ones(n);
    output_Tc = pr.Tc*pr.Jcf-273*ones(n);
    output_cA = pr.cA*pr.c_nom;
    output_cB = pr.cB*pr.c_nom;
    //output_cC_1 = pr.cC_1*pr.c_nom;
    
    connect(Table_uB2_case_1_mode_3.y, pr.u_B2_setpoint) annotation (points=[-53,56;
          -24,56; -24,54; 4.4,54; 4.4,2.2],         style(color=74, rgbcolor={0,
            0,127}));
    connect(Table_uB1_case_1_mode_3.y, pr.u_B1_setpoint) annotation (points=[-53,26;
          -30,26; -30,22; -0.8,22; -0.8,2.2],         style(color=74, rgbcolor=
            {0,0,127}));
    connect(Table_Tfeed_case_1_mode_3.y, pr.u_TfeedA_setpoint) annotation (
        points=[-57,-12; -38,-12; -38,0; -3.8,0; -3.8,-3], style(color=74,
          rgbcolor={0,0,127}));
    connect(Table_Tcool_case_1_mode_3.y, pr.u_T_cool_setpoint) annotation (
        points=[-59,-52; -32,-52; -32,-9.6; -3.8,-9.6], style(color=74,
          rgbcolor={0,0,127}));
  end platereactor_gen_initial;
  
  model platereactor_opt 
    
    annotation (Diagram,
      experiment,
      experimentSetupOutput(textual=true));
    Modelica.Blocks.Interfaces.RealInput u_B1_setpoint(max=0.7, min=0,
      start=0) 
      annotation (extent=[-86,58; -46,98],  rotation=270);
    Modelica.Blocks.Interfaces.RealInput u_TfeedA_setpoint(
      max=(273 + 80)/(670/50),
      min=(273 + 30)/(670/50),
      start=(303)/(670/50)) 
      annotation (extent=[-120,12; -80,52]);
    Modelica.Blocks.Interfaces.RealInput u_T_cool_setpoint(
      max=(273 + 80)/(670/50),
      min=(273 + 20)/(670/50),
      start=(293)/(670/50)) 
      annotation (extent=[-120,-20; -80,20]);
    platereactor pr annotation (extent=[-18,0; 2,20]);
    Modelica.Blocks.Interfaces.RealInput u_B2_setpoint(
      max=0.7,
      min=0,
      start=0) 
      annotation (extent=[-34,60; 6,100],   rotation=270);
  equation 
    connect(pr.u_T_cool_setpoint, u_T_cool_setpoint) annotation (points=[-17.8,
          6.4; -56.9,6.4; -56.9,1.11022e-15; -100,1.11022e-15], style(color=74,
          rgbcolor={0,0,127}));
    connect(pr.u_TfeedA_setpoint, u_TfeedA_setpoint) annotation (points=[-17.8,
          13; -53.9,13; -53.9,32; -100,32], style(color=74, rgbcolor={0,0,127}));
    connect(pr.u_B1_setpoint, u_B1_setpoint) annotation (points=[-14.8,18.2;
          -14.8,45.1; -66,45.1; -66,78], style(color=74, rgbcolor={0,0,127}));
    connect(u_B2_setpoint, pr.u_B2_setpoint) annotation (points=[-14,80; -12,80; -12,
          18.2; -9.6,18.2], style(color=74, rgbcolor={0,0,127}));
  end platereactor_opt;
  
  model platereactor_eval 
    
   Real u_B2_setpoint = Table_uB2.y;
   Real u_B1_setpoint = Table_uB1.y;
   Real u_TfeedA_setpoint = Table_Tfeed.y;
   Real u_T_cool_setpoint = Table_Tcool.y;
    
    Modelica.Blocks.Sources.TimeTable Table_uB2(table=[0,0.019125; 0.155051,
          0.019629; 0.644949,0.024315; 1,0.030648; 1.15505,0.029825; 1.64495,
          0.034997; 2,0.038853; 2.15505,0.040547; 2.64495,0.04593; 3,0.049822;
          3.15505,0.051502; 3.64495,0.056719; 4,0.060381; 4.15505,0.061934;
          4.64495,0.066646; 5,0.069854; 5.15505,0.071187; 5.64495,0.075129; 6,
          0.077718; 6.15505,0.078766; 6.64495,0.08176; 7,0.083626; 7.15505,
          0.08435; 7.64495,0.086303; 8,0.087399; 8.15505,0.087786; 8.64495,
          0.088669; 9,0.088994; 9.15505,0.089046; 9.64495,0.088901; 10,0.088513;
          10.1551,0.088274; 10.6449,0.087332; 11,0.086526; 11.1551,0.086193;
          11.6449,0.085475; 12,0.085516; 12.1551,0.085612; 12.6449,0.085439; 13,
          0.084903; 13.1551,0.084856; 13.6449,0.084271; 14,0.083789; 14.1551,
          0.083564; 14.6449,0.082791; 15,0.082175; 15.1551,0.081892; 15.6449,
          0.080943; 16,0.080208; 16.1551,0.079875; 16.6449,0.078784; 17,0.077961;
          17.1551,0.077594; 17.6449,0.076415; 18,0.075547; 18.1551,0.075167;
          18.6449,0.073967; 19,0.073106; 19.1551,0.072735; 19.6449,0.071587; 20,
          0.070787; 20.1551,0.070447; 20.6449,0.069423; 21,0.068731; 21.1551,
          0.068444; 21.6449,0.067604; 22,0.067062; 22.1551,0.066844; 22.6449,
          0.066237; 23,0.065875; 23.1551,0.06574; 23.6449,0.065401; 24,0.065243;
          24.1551,0.065199; 24.6449,0.065159; 25,0.065227; 25.1551,0.065282;
          25.6449,0.06556; 26,0.065866; 26.1551,0.066031; 26.6449,0.066694; 27,
          0.067344; 27.1551,0.067576; 27.6449,0.068415; 28,0.069091; 28.1551,
          0.069409; 28.6449,0.07048; 29,0.071321; 29.1551,0.071705; 29.6449,
          0.072978; 30,0.073955; 30.1551,0.074395; 30.6449,0.075833; 31,0.076918;
          31.1551,0.077402; 31.6449,0.078965; 32,0.080127; 32.1551,0.080641;
          32.6449,0.082283; 33,0.083487; 33.1551,0.084015; 33.6449,0.085686; 34,
          0.086893; 34.1551,0.087418; 34.6449,0.089059; 35,0.090227; 35.1551,
          0.09073; 35.6449,0.092284; 36,0.093372; 36.1551,0.093835; 36.6449,
          0.09525; 37,0.096227; 37.1551,0.096639; 37.6449,0.097891; 38,0.098749;
          38.1551,0.099113; 38.6449,0.100234; 39,0.101029; 39.1551,0.101365;
          39.6449,0.102384; 40,0.103085; 40.1551,0.10339; 40.6449,0.104321; 41,
          0.104979; 41.1551,0.105263; 41.6449,0.106154; 42,0.106797; 42.1551,
          0.107077; 42.6449,0.107968; 43,0.10862; 43.1551,0.108907; 43.6449,
          0.109826; 44,0.110506; 44.1551,0.110806; 44.6449,0.111771; 45,0.112485;
          45.1551,0.112801; 45.6449,0.113816; 46,0.114566; 46.1551,0.114897;
          46.6449,0.115957; 47,0.116738; 47.1551,0.117082; 47.6449,0.11818; 48,
          0.118986; 48.1551,0.11934; 48.6449,0.120469; 49,0.121296; 49.1551,
          0.12166; 49.6449,0.122819; 50,0.123668; 50.1551,0.124042; 50.6449,
          0.125238; 51,0.126119; 51.1551,0.126508; 51.6449,0.127759; 52,0.128687;
          52.1551,0.129099; 52.6449,0.130434; 53,0.131435; 53.1551,0.131882;
          53.6449,0.133342; 54,0.134449; 54.1551,0.134947; 54.6449,0.136588; 55,
          0.137847; 55.1551,0.138418; 55.6449,0.140315; 56,0.141789; 56.1551,
          0.142463; 56.6449,0.144723; 57,0.146503; 57.1551,0.147318; 57.6449,
          0.150098; 58,0.152325; 58.1551,0.153368; 58.6449,0.156948; 59,0.159836;
          59.1551,0.161185; 59.6449,0.16583; 60,0.169623; 60.1551,0.171417;
          60.6449,0.177738; 61,0.183082; 61.1551,0.18569; 61.6449,0.195312; 62,
          0.204063; 62.1551,0.209377; 62.6449,0.222275; 63,0.230144; 63.1551,
          0.233606; 63.6449,0.244535; 64,0.25266; 64.1551,0.256243; 64.6449,
          0.267692; 65,0.27607; 65.1551,0.279731; 65.6449,0.291298; 66,0.299643;
          66.1551,0.303261; 66.6449,0.314573; 67,0.32263; 67.1551,0.326096;
          67.6449,0.336837; 68,0.344398; 68.1551,0.34763; 68.6449,0.357559; 69,
          0.364476; 69.1551,0.367414; 69.6449,0.376377; 70,0.382564; 70.1551,
          0.385178; 70.6449,0.393103; 71,0.398533; 71.1551,0.400816; 71.6449,
          0.407707; 72,0.412399; 72.1551,0.414366; 72.6449,0.420276; 73,0.42428;
          73.1551,0.425952; 73.6449,0.430956; 74,0.434326; 74.1551,0.435726;
          74.6449,0.439901; 75,0.442694; 75.1551,0.443858; 75.6449,0.447387; 76,
          0.449846; 76.1551,0.450961; 76.6449,0.454887; 77,0.458358; 77.1551,
          0.45995; 77.6449,0.464544; 78,0.467315; 78.1551,0.468416; 78.6449,
          0.471733; 79,0.474057; 79.1551,0.475078; 79.6449,0.478207; 80,0.480424;
          80.1551,0.481377; 80.6449,0.48433; 81,0.486416; 81.1551,0.48731;
          81.6449,0.490074; 82,0.492018; 82.1551,0.492848; 82.6449,0.495405; 83,
          0.497191; 83.1551,0.497951; 83.6449,0.500279; 84,0.501894; 84.1551,
          0.502578; 84.6449,0.504661; 85,0.506092; 85.1551,0.506696; 85.6449,
          0.508518; 86,0.509759; 86.1551,0.510279; 86.6449,0.511834; 87,0.51288;
          87.1551,0.513315; 87.6449,0.514602; 88,0.515455; 88.1551,0.515805;
          88.6449,0.51683; 89,0.517494; 89.1551,0.517764; 89.6449,0.518536; 90,
          0.519022; 90.1551,0.519215; 90.6449,0.519752; 91,0.520073; 91.1551,
          0.520195; 91.6449,0.520516; 92,0.520688; 92.1551,0.520747; 92.6449,
          0.520876; 93,0.520917; 93.1551,0.520921; 93.6449,0.520884; 94,0.520812;
          94.1551,0.520769; 94.6449,0.520593; 95,0.520428; 95.1551,0.520347;
          95.6449,0.520059; 96,0.519821; 96.1551,0.519711; 96.6449,0.519339; 97,
          0.51905; 97.1551,0.518921; 97.6449,0.518493; 98,0.518168; 98.1551,
          0.518022; 98.6449,0.517555; 99,0.517211; 99.1551,0.51706; 99.6449,
          0.516577; 100,0.516226; 100.155,0.516073; 100.645,0.515592; 101,
          0.515247; 101.155,0.515098; 101.645,0.514635; 102,0.514307; 102.155,
          0.514166; 102.645,0.513732; 103,0.513429; 103.155,0.5133; 103.645,
          0.512905; 104,0.512633; 104.155,0.512518; 104.645,0.512169; 105,
          0.511932; 105.155,0.511833; 105.645,0.511535; 106,0.511335; 106.155,
          0.511252; 106.645,0.511007; 107,0.510846; 107.155,0.51078; 107.645,
          0.510588; 108,0.510465; 108.155,0.510415; 108.645,0.510274; 109,
          0.510187; 109.155,0.510153; 109.645,0.51006; 110,0.510007; 110.155,
          0.509987; 110.645,0.509938; 111,0.509915; 111.155,0.509908; 111.645,
          0.509897; 112,0.5099; 112.155,0.509904; 112.645,0.509926; 113,0.509951;
          113.155,0.509964; 113.645,0.510014; 114,0.510056; 114.155,0.510076;
          114.645,0.510146; 115,0.510201; 115.155,0.510227; 115.645,0.510311; 116,
          0.510375; 116.155,0.510404; 116.645,0.510496; 117,0.510565; 117.155,
          0.510596; 117.645,0.510692; 118,0.510761; 118.155,0.510792; 118.645,
          0.510886; 119,0.510953; 119.155,0.510982; 119.645,0.511071; 120,
          0.511133; 120.155,0.51116; 120.645,0.51124; 121,0.511294; 121.155,
          0.511317; 121.645,0.511385; 122,0.511431; 122.155,0.51145; 122.645,
          0.511504; 123,0.51154; 123.155,0.511554; 123.645,0.511594; 124,0.511618;
          124.155,0.511628; 124.645,0.511653; 125,0.511667; 125.155,0.511672;
          125.645,0.511683; 126,0.511687; 126.155,0.511688; 126.645,0.511686; 127,
          0.511681; 127.155,0.511678; 127.645,0.511666; 128,0.511654; 128.155,
          0.511648; 128.645,0.511627; 129,0.51161; 129.155,0.511602; 129.645,
          0.511576; 130,0.511557; 130.155,0.511548; 130.645,0.511521; 131,
          0.511501; 131.155,0.511493; 131.645,0.511469; 132,0.511453; 132.155,
          0.511447; 132.645,0.511429; 133,0.51142; 1000,0.51142]) 
                     annotation (extent=[-16,66; 4,86]);
    Modelica.Blocks.Sources.TimeTable Table_uB1(table=[0,0.011519; 0.155051,
          0.012343; 0.644949,0.015057; 1,0.017128; 1.15505,0.018041; 1.64495,
          0.020989; 2,0.02315; 2.15505,0.024091; 2.64495,0.027037; 3,0.029125;
          3.15505,0.030016; 3.64495,0.032735; 4,0.034599; 4.15505,0.035377;
          4.64495,0.037684; 5,0.039207; 5.15505,0.039824; 5.64495,0.041589; 6,
          0.04269; 6.15505,0.043115; 6.64495,0.044255; 7,0.044886; 7.15505,
          0.045102; 7.64495,0.045572; 8,0.045712; 8.15505,0.045715; 8.64495,
          0.045545; 9,0.045265; 9.15505,0.045116; 9.64495,0.044674; 10,0.044479;
          10.1551,0.044657; 10.6449,0.045252; 11,0.045812; 11.1551,0.045589;
          11.6449,0.045926; 12,0.046234; 12.1551,0.046249; 12.6449,0.046634; 13,
          0.046899; 13.1551,0.047029; 13.6449,0.047459; 14,0.047789; 14.1551,
          0.047943; 14.6449,0.048453; 15,0.048852; 15.1551,0.049035; 15.6449,
          0.049649; 16,0.050131; 16.1551,0.050352; 16.6449,0.051095; 17,0.051679;
          17.1551,0.051948; 17.6449,0.052854; 18,0.05357; 18.1551,0.0539; 18.6449,
          0.055017; 19,0.055903; 19.1551,0.056313; 19.6449,0.057708; 20,0.058823;
          20.1551,0.059341; 20.6449,0.061115; 21,0.062547; 21.1551,0.063217;
          21.6449,0.065534; 22,0.067428; 22.1551,0.068324; 22.6449,0.071464; 23,
          0.074081; 23.1551,0.075339; 23.6449,0.079843; 24,0.083715; 24.1551,
          0.085607; 24.6449,0.0927; 25,0.098918; 25.1551,0.101955; 25.6449,
          0.112858; 26,0.122468; 26.1551,0.127341; 26.6449,0.146923; 27,0.167171;
          27.1551,0.171373; 27.6449,0.186471; 28,0.197234; 28.1551,0.202209;
          28.6449,0.217558; 29,0.228688; 29.1551,0.233511; 29.6449,0.248583; 30,
          0.259281; 30.1551,0.263858; 30.6449,0.277933; 31,0.287717; 31.1551,
          0.29185; 31.6449,0.304359; 32,0.312873; 32.1551,0.316421; 32.6449,
          0.326983; 33,0.334013; 33.1551,0.336899; 33.6449,0.345333; 34,0.350803;
          34.1551,0.353008; 34.6449,0.359305; 35,0.36325; 35.1551,0.364798;
          35.6449,0.369065; 36,0.371587; 36.1551,0.372527; 36.6449,0.374957; 37,
          0.376228; 37.1551,0.376659; 37.6449,0.377714; 38,0.378277; 38.1551,
          0.378563; 38.6449,0.380177; 39,0.382478; 39.1551,0.383416; 39.6449,
          0.385937; 40,0.387418; 40.1551,0.388297; 40.6449,0.390602; 41,0.392296;
          41.1551,0.393023; 41.6449,0.395344; 42,0.397027; 42.1551,0.397762;
          42.6449,0.400085; 43,0.401769; 43.1551,0.402504; 43.6449,0.404829; 44,
          0.406514; 44.1551,0.40725; 44.6449,0.409575; 45,0.411261; 45.1551,
          0.411998; 45.6449,0.414325; 46,0.416012; 46.1551,0.416749; 46.6449,
          0.419078; 47,0.420766; 47.1551,0.421503; 47.6449,0.423833; 48,0.425522;
          48.1551,0.42626; 48.6449,0.428592; 49,0.430282; 49.1551,0.43102;
          49.6449,0.433353; 50,0.435045; 50.1551,0.435784; 50.6449,0.438118; 51,
          0.439811; 51.1551,0.44055; 51.6449,0.442886; 52,0.44458; 52.1551,
          0.44532; 52.6449,0.447657; 53,0.449352; 53.1551,0.450093; 53.6449,
          0.452432; 54,0.454128; 54.1551,0.454869; 54.6449,0.45721; 55,0.458907;
          55.1551,0.459649; 55.6449,0.461992; 56,0.46369; 56.1551,0.464439;
          56.6449,0.466727; 57,0.468332; 57.1551,0.468716; 57.6449,0.470253; 58,
          0.4712; 58.1551,0.471648; 58.6449,0.472859; 59,0.473657; 59.1551,
          0.47398; 59.6449,0.474916; 60,0.475519; 60.1551,0.475756; 60.6449,
          0.476426; 61,0.476836; 61.1551,0.476988; 61.6449,0.477384; 62,0.477585;
          62.1551,0.477621; 62.6449,0.477858; 63,0.478132; 63.1551,0.478302;
          63.6449,0.478728; 64,0.478961; 64.1551,0.479096; 64.6449,0.479471; 65,
          0.479736; 65.1551,0.479858; 65.6449,0.480232; 66,0.480505; 66.1551,
          0.480624; 66.6449,0.481005; 67,0.481282; 67.1551,0.481403; 67.6449,
          0.48179; 68,0.482072; 68.1551,0.482195; 68.6449,0.482588; 69,0.482874;
          69.1551,0.482999; 69.6449,0.483396; 70,0.483684; 70.1551,0.483811;
          70.6449,0.484214; 71,0.48451; 71.1551,0.484638; 71.6449,0.485045; 72,
          0.48534; 72.1551,0.485468; 72.6449,0.485877; 73,0.486176; 73.1551,
          0.486306; 73.6449,0.486717; 74,0.487017; 74.1551,0.487148; 74.6449,
          0.487562; 75,0.487862; 75.1551,0.487994; 75.6449,0.488408; 76,0.488707;
          76.1551,0.48885; 76.6449,0.489255; 77,0.489482; 77.1551,0.489492;
          77.6449,0.489616; 78,0.489727; 78.1551,0.48978; 78.6449,0.489944; 79,
          0.490047; 79.1551,0.490084; 79.6449,0.490185; 80,0.49024; 80.1551,
          0.490259; 80.6449,0.490301; 81,0.490314; 81.1551,0.490316; 81.6449,
          0.490305; 82,0.490284; 82.1551,0.49027; 82.6449,0.490218; 83,0.490169;
          83.1551,0.490147; 83.6449,0.490073; 84,0.490021; 84.1551,0.490003;
          84.6449,0.489936; 85,0.489878; 85.1551,0.489849; 85.6449,0.489767; 86,
          0.489711; 86.1551,0.489683; 86.6449,0.489605; 87,0.48955; 87.1551,
          0.489526; 87.6449,0.489457; 88,0.489409; 88.1551,0.48939; 88.6449,
          0.489331; 89,0.489293; 89.1551,0.489277; 89.6449,0.489231; 90,0.489202;
          90.1551,0.48919; 90.6449,0.489156; 91,0.489134; 91.1551,0.489125;
          91.6449,0.4891; 92,0.489085; 92.1551,0.489079; 92.6449,0.489061; 93,
          0.489049; 93.1551,0.489045; 93.6449,0.489031; 94,0.489023; 94.1551,
          0.489016; 94.6449,0.488998; 95,0.488983; 95.1551,0.488977; 95.6449,
          0.488957; 96,0.488941; 96.1551,0.488934; 96.6449,0.488909; 97,0.48889;
          97.1551,0.488881; 97.6449,0.488851; 98,0.488828; 98.1551,0.488818;
          98.6449,0.488786; 99,0.488764; 99.1551,0.488757; 99.6449,0.488736; 100,
          0.488722; 100.155,0.488713; 100.645,0.488693; 101,0.48868; 101.155,
          0.488674; 101.645,0.488657; 102,0.488647; 102.155,0.488642; 102.645,
          0.48863; 103,0.488622; 103.155,0.488619; 103.645,0.488611; 104,0.488606;
          104.155,0.488604; 104.645,0.488601; 105,0.488599; 105.155,0.488599;
          105.645,0.488599; 106,0.488599; 106.155,0.4886; 106.645,0.488603; 107,
          0.488606; 107.155,0.488608; 107.645,0.488614; 108,0.488619; 108.155,
          0.488621; 108.645,0.48863; 109,0.488636; 109.155,0.488639; 109.645,
          0.488649; 110,0.488657; 110.155,0.48866; 110.645,0.488671; 111,0.48868;
          111.155,0.488683; 111.645,0.488695; 112,0.488703; 112.155,0.488707;
          112.645,0.488718; 113,0.488727; 113.155,0.48873; 113.645,0.488741; 114,
          0.488749; 114.155,0.488752; 114.645,0.488762; 115,0.488769; 115.155,
          0.488772; 115.645,0.488781; 116,0.488786; 116.155,0.488789; 116.645,
          0.488796; 117,0.488801; 117.155,0.488803; 117.645,0.488808; 118,
          0.488811; 118.155,0.488813; 118.645,0.488817; 119,0.488819; 119.155,
          0.48882; 119.645,0.488822; 120,0.488823; 120.155,0.488823; 120.645,
          0.488823; 121,0.488823; 121.155,0.488823; 121.645,0.488822; 122,
          0.488821; 122.155,0.48882; 122.645,0.488818; 123,0.488816; 123.155,
          0.488815; 123.645,0.488811; 124,0.488809; 124.155,0.488808; 124.645,
          0.488803; 125,0.4888; 125.155,0.488799; 125.645,0.488794; 126,0.488791;
          126.155,0.488789; 126.645,0.488785; 127,0.488781; 127.155,0.48878;
          127.645,0.488775; 128,0.488772; 128.155,0.488771; 128.645,0.488767; 129,
          0.488764; 129.155,0.488763; 129.645,0.48876; 130,0.488758; 130.155,
          0.488757; 130.645,0.488756; 131,0.488755; 131.155,0.488754; 131.645,
          0.488755; 132,0.488755; 132.155,0.488756; 132.645,0.488758; 133,0.48876;
          1000,0.48876]) 
      annotation (extent=[-52,42; -32,62]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed(table=[0,22.5901; 0.155051,
          22.6132; 0.644949,22.6864; 1,22.7394; 1.15505,22.7625; 1.64495,22.8356;
          2,22.8886; 2.15505,22.9118; 2.64495,22.9849; 3,23.0379; 3.15505,23.061;
          3.64495,23.1341; 4,23.1871; 4.15505,23.2103; 4.64495,23.2834; 5,23.3364;
          5.15505,23.3595; 5.64495,23.4326; 6,23.4856; 6.15505,23.5088; 6.64495,
          23.5819; 7,23.6349; 7.15505,23.658; 7.64495,23.7311; 8,23.7841; 8.15505,
          23.8073; 8.64495,23.8804; 9,23.9334; 9.15505,23.9565; 9.64495,24.0297;
          10,24.0826; 10.1551,24.1058; 10.6449,24.1789; 11,24.2319; 11.1551,
          24.255; 11.6449,24.3282; 12,24.3812; 12.1551,24.4043; 12.6449,24.4774;
          13,24.5304; 13.1551,24.5535; 13.6449,24.6267; 14,24.6797; 14.1551,
          24.7028; 14.6449,24.7759; 15,24.8289; 15.1551,24.8521; 15.6449,24.9252;
          16,24.9782; 16.1551,25.0013; 16.6449,25.0744; 17,25.1274; 17.1551,
          25.1506; 17.6449,25.2237; 18,25.2767; 18.1551,25.2998; 18.6449,25.3729;
          19,25.4259; 19.1551,25.4491; 19.6449,25.5222; 20,25.5752; 20.1551,
          25.5983; 20.6449,25.6714; 21,25.7244; 21.1551,25.7476; 21.6449,25.8207;
          22,25.8737; 22.1551,25.8968; 22.6449,25.97; 23,26.0229; 23.1551,26.0461;
          23.6449,26.1192; 24,26.1722; 24.1551,26.1938; 24.6449,26.2586; 25,
          26.2562; 25.1551,26.2388; 25.6449,26.184; 26,26.1442; 26.1551,26.1269;
          26.6449,26.072; 27,26.0323; 27.1551,26.0149; 27.6449,25.9601; 28,
          25.9203; 28.1551,25.903; 28.6449,25.8481; 29,25.8084; 29.1551,25.791;
          29.6449,25.7362; 30,25.6965; 30.1551,25.6791; 30.6449,25.6243; 31,
          25.5845; 31.1551,25.5672; 31.6449,25.5123; 32,25.4726; 32.1551,25.4552;
          32.6449,25.4004; 33,25.3606; 33.1551,25.3433; 33.6449,25.2884; 34,
          25.2487; 34.1551,25.2313; 34.6449,25.1765; 35,25.1368; 35.1551,25.1194;
          35.6449,25.0646; 36,25.0248; 36.1551,25.0075; 36.6449,24.9526; 37,
          24.9129; 37.1551,24.8955; 37.6449,24.8407; 38,24.8009; 38.1551,24.7836;
          38.6449,24.7287; 39,24.689; 39.1551,24.6716; 39.6449,24.6168; 40,
          24.5771; 40.1551,24.5597; 40.6449,24.5049; 41,24.4651; 41.1551,24.4478;
          41.6449,24.3929; 42,24.3532; 42.1551,24.3358; 42.6449,24.281; 43,
          24.2412; 43.1551,24.2239; 43.6449,24.169; 44,24.1293; 44.1551,24.1119;
          44.6449,24.0571; 45,24.0174; 45.1551,24; 45.6449,23.9452; 46,23.9054;
          46.1551,23.8881; 46.6449,23.8332; 47,23.7935; 47.1551,23.7761; 47.6449,
          23.7213; 48,23.6815; 48.1551,23.6642; 48.6449,23.6093; 49,23.5696;
          49.1551,23.5522; 49.6449,23.4974; 50,23.4577; 50.1551,23.4403; 50.6449,
          23.3855; 51,23.3457; 51.1551,23.3284; 51.6449,23.2735; 52,23.2338;
          52.1551,23.2164; 52.6449,23.1616; 53,23.1218; 53.1551,23.1045; 53.6449,
          23.0496; 54,23.0099; 54.1551,22.9925; 54.6449,22.9377; 55,22.898;
          55.1551,22.8806; 55.6449,22.8258; 56,22.786; 56.1551,22.7687; 56.6449,
          22.7138; 57,22.6741; 57.1551,22.6627; 57.6449,22.5914; 58,22.5901;
          58.1551,22.5901; 58.6449,22.5901; 59,22.5901; 59.1551,22.5901; 59.6449,
          22.5901; 60,22.5901; 60.1551,22.5901; 60.6449,22.5901; 61,22.5901;
          61.1551,22.5901; 61.6449,22.5901; 62,22.5901; 62.1551,22.5901; 62.6449,
          22.5901; 63,22.5901; 63.1551,22.5901; 63.6449,22.5901; 64,22.5901;
          64.1551,22.5901; 64.6449,22.5901; 65,22.5901; 65.1551,22.5901; 65.6449,
          22.5901; 66,22.5901; 66.1551,22.5901; 66.6449,22.5901; 67,22.5901;
          67.1551,22.5901; 67.6449,22.5901; 68,22.5901; 68.1551,22.5901; 68.6449,
          22.5901; 69,22.5901; 69.1551,22.5901; 69.6449,22.5901; 70,22.5901;
          70.1551,22.5901; 70.6449,22.5901; 71,22.5901; 71.1551,22.5901; 71.6449,
          22.5901; 72,22.5901; 72.1551,22.5901; 72.6449,22.5901; 73,22.5901;
          73.1551,22.5901; 73.6449,22.5901; 74,22.5901; 74.1551,22.5901; 74.6449,
          22.5901; 75,22.5901; 75.1551,22.5901; 75.6449,22.5901; 76,22.5901;
          76.1551,22.5901; 76.6449,22.5901; 77,22.5936; 77.1551,22.5913; 77.6449,
          22.5901; 78,22.5901; 78.1551,22.5901; 78.6449,22.5901; 79,22.5901;
          79.1551,22.5901; 79.6449,22.5901; 80,22.5901; 80.1551,22.5901; 80.6449,
          22.5901; 81,22.5901; 81.1551,22.5901; 81.6449,22.5901; 82,22.5901;
          82.1551,22.5901; 82.6449,22.5901; 83,22.5901; 83.1551,22.5901; 83.6449,
          22.5901; 84,22.5901; 84.1551,22.5901; 84.6449,22.5901; 85,22.5901;
          85.1551,22.5901; 85.6449,22.5901; 86,22.5901; 86.1551,22.5901; 86.6449,
          22.5901; 87,22.5901; 87.1551,22.5901; 87.6449,22.5901; 88,22.5901;
          88.1551,22.5901; 88.6449,22.5901; 89,22.5901; 89.1551,22.5901; 89.6449,
          22.5901; 90,22.5901; 90.1551,22.5901; 90.6449,22.5901; 91,22.5901;
          91.1551,22.5901; 91.6449,22.5901; 92,22.5901; 92.1551,22.5901; 92.6449,
          22.5901; 93,22.5901; 93.1551,22.5901; 93.6449,22.5901; 94,22.5901;
          94.1551,22.5901; 94.6449,22.5901; 95,22.5901; 95.1551,22.5901; 95.6449,
          22.5901; 96,22.5901; 96.1551,22.5901; 96.6449,22.5901; 97,22.5901;
          97.1551,22.5901; 97.6449,22.5901; 98,22.5901; 98.1551,22.5901; 98.6449,
          22.5901; 99,22.5901; 99.1551,22.5901; 99.6449,22.5901; 100,22.5901;
          100.155,22.5901; 100.645,22.5901; 101,22.5901; 101.155,22.5901; 101.645,
          22.5901; 102,22.5901; 102.155,22.5901; 102.645,22.5901; 103,22.5901;
          103.155,22.5901; 103.645,22.5901; 104,22.5901; 104.155,22.5901; 104.645,
          22.5901; 105,22.5901; 105.155,22.5901; 105.645,22.5901; 106,22.5901;
          106.155,22.5901; 106.645,22.5901; 107,22.5901; 107.155,22.5901; 107.645,
          22.5901; 108,22.5901; 108.155,22.5901; 108.645,22.5901; 109,22.5901;
          109.155,22.5901; 109.645,22.5901; 110,22.5901; 110.155,22.5901; 110.645,
          22.5901; 111,22.5901; 111.155,22.5901; 111.645,22.5901; 112,22.5901;
          112.155,22.5901; 112.645,22.5901; 113,22.5901; 113.155,22.5901; 113.645,
          22.5901; 114,22.5901; 114.155,22.5901; 114.645,22.5901; 115,22.5901;
          115.155,22.5901; 115.645,22.5901; 116,22.5901; 116.155,22.5901; 116.645,
          22.5901; 117,22.5901; 117.155,22.5901; 117.645,22.5901; 118,22.5901;
          118.155,22.5901; 118.645,22.5901; 119,22.5901; 119.155,22.5901; 119.645,
          22.5901; 120,22.5901; 120.155,22.5901; 120.645,22.5901; 121,22.5901;
          121.155,22.5901; 121.645,22.5901; 122,22.5901; 122.155,22.5901; 122.645,
          22.5901; 123,22.5901; 123.155,22.5901; 123.645,22.5901; 124,22.5901;
          124.155,22.5901; 124.645,22.5901; 125,22.5901; 125.155,22.5901; 125.645,
          22.5901; 126,22.5901; 126.155,22.5901; 126.645,22.5901; 127,22.5901;
          127.155,22.5901; 127.645,22.5901; 128,22.5901; 128.155,22.5901; 128.645,
          22.5901; 129,22.5901; 129.155,22.5901; 129.645,22.5901; 130,22.5901;
          130.155,22.5901; 130.645,22.5901; 131,22.5901; 131.155,22.5901; 131.645,
          22.5901; 132,22.5901; 132.155,22.5901; 132.645,22.5901; 133,22.5901;
          1000,22.5901]) 
      annotation (extent=[-54,12; -34,32]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool(table=[0,21.8446; 0.155051,
          21.8527; 0.644949,21.8783; 1,21.8968; 1.15505,21.9049; 1.64495,21.9305;
          2,21.949; 2.15505,21.9571; 2.64495,21.9827; 3,22.0013; 3.15505,22.0094;
          3.64495,22.035; 4,22.0535; 4.15505,22.0616; 4.64495,22.0872; 5,22.1058;
          5.15505,22.1139; 5.64495,22.1394; 6,22.158; 6.15505,22.1661; 6.64495,
          22.1917; 7,22.2102; 7.15505,22.2183; 7.64495,22.2439; 8,22.2625;
          8.15505,22.2706; 8.64495,22.2962; 9,22.3147; 9.15505,22.3228; 9.64495,
          22.3484; 10,22.3669; 10.1551,22.375; 10.6449,22.4006; 11,22.4192;
          11.1551,22.4273; 11.6449,22.4529; 12,22.4714; 12.1551,22.4795; 12.6449,
          22.5051; 13,22.5237; 13.1551,22.5318; 13.6449,22.5574; 14,22.5759;
          14.1551,22.584; 14.6449,22.6096; 15,22.6281; 15.1551,22.6362; 15.6449,
          22.6618; 16,22.6804; 16.1551,22.6885; 16.6449,22.7141; 17,22.7326;
          17.1551,22.7407; 17.6449,22.7663; 18,22.7849; 18.1551,22.793; 18.6449,
          22.8185; 19,22.8371; 19.1551,22.8452; 19.6449,22.8708; 20,22.8893;
          20.1551,22.8974; 20.6449,22.923; 21,22.9416; 21.1551,22.9497; 21.6449,
          22.9753; 22,22.9938; 22.1551,23.0019; 22.6449,23.0275; 23,23.0461;
          23.1551,23.0542; 23.6449,23.0797; 24,23.0983; 24.1551,23.1064; 24.6449,
          23.132; 25,23.1505; 25.1551,23.1586; 25.6449,23.1842; 26,23.2028;
          26.1551,23.2109; 26.6449,23.2365; 27,23.255; 27.1551,23.2631; 27.6449,
          23.2887; 28,23.3072; 28.1551,23.3153; 28.6449,23.3409; 29,23.3595;
          29.1551,23.3676; 29.6449,23.3932; 30,23.4117; 30.1551,23.4198; 30.6449,
          23.4454; 31,23.464; 31.1551,23.4721; 31.6449,23.4977; 32,23.5162;
          32.1551,23.5243; 32.6449,23.5499; 33,23.5684; 33.1551,23.5765; 33.6449,
          23.6021; 34,23.6207; 34.1551,23.6288; 34.6449,23.6544; 35,23.6729;
          35.1551,23.681; 35.6449,23.7066; 36,23.7252; 36.1551,23.7333; 36.6449,
          23.7588; 37,23.7774; 37.1551,23.7855; 37.6449,23.8111; 38,23.8296;
          38.1551,23.8377; 38.6449,23.8633; 39,23.8819; 39.1551,23.89; 39.6449,
          23.9156; 40,23.9341; 40.1551,23.9422; 40.6449,23.9678; 41,23.9864;
          41.1551,23.9945; 41.6449,24.02; 42,24.0386; 42.1551,24.0467; 42.6449,
          24.0723; 43,24.0908; 43.1551,24.0989; 43.6449,24.1245; 44,24.1431;
          44.1551,24.1512; 44.6449,24.1768; 45,24.1953; 45.1551,24.2034; 45.6449,
          24.229; 46,24.2475; 46.1551,24.2556; 46.6449,24.2812; 47,24.2998;
          47.1551,24.3079; 47.6449,24.3335; 48,24.352; 48.1551,24.3601; 48.6449,
          24.3857; 49,24.4043; 49.1551,24.4124; 49.6449,24.438; 50,24.4565;
          50.1551,24.4646; 50.6449,24.4902; 51,24.5087; 51.1551,24.5168; 51.6449,
          24.5424; 52,24.561; 52.1551,24.5691; 52.6449,24.5947; 53,24.6132;
          53.1551,24.6213; 53.6449,24.6469; 54,24.6655; 54.1551,24.6736; 54.6449,
          24.6991; 55,24.7177; 55.1551,24.7258; 55.6449,24.7514; 56,24.7699;
          56.1551,24.778; 56.6449,24.8036; 57,24.8222; 57.1551,24.8303; 57.6449,
          24.8559; 58,24.8744; 58.1551,24.8626; 58.6449,24.8134; 59,24.7731;
          59.1551,24.7558; 59.6449,24.7009; 60,24.6612; 60.1551,24.6438; 60.6449,
          24.589; 61,24.5493; 61.1551,24.5319; 61.6449,24.4771; 62,24.4373;
          62.1551,24.42; 62.6449,24.3651; 63,24.3254; 63.1551,24.308; 63.6449,
          24.2532; 64,24.2134; 64.1551,24.1961; 64.6449,24.1412; 65,24.1015;
          65.1551,24.0841; 65.6449,24.0293; 66,23.9896; 66.1551,23.9722; 66.6449,
          23.9174; 67,23.8776; 67.1551,23.8603; 67.6449,23.8054; 68,23.7657;
          68.1551,23.7483; 68.6449,23.6935; 69,23.6537; 69.1551,23.6364; 69.6449,
          23.5815; 70,23.5418; 70.1551,23.5244; 70.6449,23.4696; 71,23.4298;
          71.1551,23.4125; 71.6449,23.3577; 72,23.3179; 72.1551,23.3006; 72.6449,
          23.2457; 73,23.206; 73.1551,23.1886; 73.6449,23.1338; 74,23.094;
          74.1551,23.0767; 74.6449,23.0218; 75,22.9821; 75.1551,22.9647; 75.6449,
          22.9099; 76,22.8701; 76.1551,22.8528; 76.6449,22.798; 77,22.7582;
          77.1551,22.7663; 77.6449,22.7919; 78,22.8104; 78.1551,22.8185; 78.6449,
          22.8441; 79,22.8627; 79.1551,22.8708; 79.6449,22.8964; 80,22.9149;
          80.1551,22.923; 80.6449,22.9486; 81,22.9672; 81.1551,22.9751; 81.6449,
          23.0006; 82,23.0155; 82.1551,23.0204; 82.6449,23.0322; 83,23.0396;
          83.1551,23.043; 83.6449,23.0557; 84,23.0674; 84.1551,23.073; 84.6449,
          23.0909; 85,23.1029; 85.1551,23.1078; 85.6449,23.1221; 86,23.1315;
          86.1551,23.1352; 86.6449,23.1458; 87,23.1524; 87.1551,23.155; 87.6449,
          23.162; 88,23.166; 88.1551,23.1676; 88.6449,23.1715; 89,23.1735;
          89.1551,23.1742; 89.6449,23.1757; 90,23.1763; 90.1551,23.1764; 90.6449,
          23.1764; 91,23.1762; 91.1551,23.176; 91.6449,23.1753; 92,23.1748;
          92.1551,23.1745; 92.6449,23.1738; 93,23.1733; 93.1551,23.1731; 93.6449,
          23.1726; 94,23.1722; 94.1551,23.1721; 94.6449,23.1721; 95,23.1732;
          95.1551,23.174; 95.6449,23.1784; 96,23.1832; 96.1551,23.1856; 96.6449,
          23.1943; 97,23.2005; 97.1551,23.2028; 97.6449,23.2082; 98,23.2102;
          98.1551,23.2109; 98.6449,23.213; 99,23.2146; 99.1551,23.2153; 99.6449,
          23.2175; 100,23.2187; 100.155,23.2192; 100.645,23.2205; 101,23.2213;
          101.155,23.2216; 101.645,23.2224; 102,23.2228; 102.155,23.2229; 102.645,
          23.223; 103,23.2229; 103.155,23.2228; 103.645,23.2222; 104,23.2216;
          104.155,23.2213; 104.645,23.2201; 105,23.2191; 105.155,23.2187; 105.645,
          23.2172; 106,23.2161; 106.155,23.2156; 106.645,23.2139; 107,23.2125;
          107.155,23.2119; 107.645,23.2099; 108,23.2084; 108.155,23.2078; 108.645,
          23.2057; 109,23.2042; 109.155,23.2035; 109.645,23.2014; 110,23.1999;
          110.155,23.1993; 110.645,23.1973; 111,23.1959; 111.155,23.1953; 111.645,
          23.1935; 112,23.1923; 112.155,23.1917; 112.645,23.1902; 113,23.1891;
          113.155,23.1886; 113.645,23.1873; 114,23.1865; 114.155,23.1861; 114.645,
          23.1851; 115,23.1845; 115.155,23.1842; 115.645,23.1835; 116,23.1831;
          116.155,23.183; 116.645,23.1826; 117,23.1824; 117.155,23.1823; 117.645,
          23.1822; 118,23.1822; 118.155,23.1823; 118.645,23.1824; 119,23.1826;
          119.155,23.1827; 119.645,23.1831; 120,23.1835; 120.155,23.1836; 120.645,
          23.1842; 121,23.1847; 121.155,23.1849; 121.645,23.1856; 122,23.1862;
          122.155,23.1865; 122.645,23.1873; 123,23.1879; 123.155,23.1882; 123.645,
          23.1891; 124,23.1897; 124.155,23.19; 124.645,23.1909; 125,23.1915;
          125.155,23.1918; 125.645,23.1926; 126,23.1932; 126.155,23.1934; 126.645,
          23.1941; 127,23.1946; 127.155,23.1948; 127.645,23.1954; 128,23.1958;
          128.155,23.1959; 128.645,23.1963; 129,23.1965; 129.155,23.1965; 129.645,
          23.1967; 130,23.1967; 130.155,23.1966; 130.645,23.1965; 131,23.1962;
          131.155,23.1961; 131.645,23.1954; 132,23.1948; 132.155,23.1945; 132.645,
          23.1936; 133,23.1928; 1000,23.1928]) 
                                         annotation (extent=[-50,-20; -30,0]);
    annotation (Diagram);
    platereactor pr annotation (extent=[-12,4; 8,24]);
    Modelica.Blocks.Sources.TimeTable Table_uB3(table=[0,0; 50,0.0; 200,0.0]) 
                annotation (extent=[30,-46; 50,-26]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed1(
                                                  table=[0,22.5901; 0.155051,
          22.6132; 0.644949,22.6864; 1,22.7394; 1.15505,22.7625; 1.64495,
          22.8356; 2,22.8886; 2.15505,22.9118; 2.64495,22.9849; 3,23.0379;
          3.15505,23.061; 3.64495,23.1341; 4,23.1871; 4.15505,23.2103; 4.64495,
          23.2834; 5,23.3364; 5.15505,23.3595; 5.64495,23.4326; 6,23.4856;
          6.15505,23.5088; 6.64495,23.5819; 7,23.6349; 7.15505,23.658; 7.64495,
          23.7311; 8,23.7841; 8.15505,23.8073; 8.64495,23.8804; 9,23.9334;
          9.15505,23.9565; 9.64495,24.0297; 10,24.0826; 10.1551,24.1058;
          10.6449,24.1789; 11,24.2319; 11.1551,24.255; 11.6449,24.3282; 12,
          24.3812; 12.1551,24.4043; 12.6449,24.4774; 13,24.5304; 13.1551,
          24.5535; 13.6449,24.6267; 14,24.6797; 14.1551,24.7028; 14.6449,
          24.7759; 15,24.8289; 15.1551,24.8521; 15.6449,24.9252; 16,24.9782;
          16.1551,25.0013; 16.6449,25.0744; 17,25.1274; 17.1551,25.1506;
          17.6449,25.2237; 18,25.2767; 18.1551,25.2998; 18.6449,25.3729; 19,
          25.4259; 19.1551,25.4491; 19.6449,25.5222; 20,25.5752; 20.1551,
          25.5983; 20.6449,25.6714; 21,25.7244; 21.1551,25.7476; 21.6449,
          25.8207; 22,25.8737; 22.1551,25.8968; 22.6449,25.97; 23,26.0229;
          23.1551,26.0461; 23.6449,26.1192; 24,26.1722; 24.1551,26.1938;
          24.6449,26.2586; 25,26.2562; 25.1551,26.2388; 25.6449,26.184; 26,
          26.1442; 26.1551,26.1269; 26.6449,26.072; 27,26.0323; 27.1551,26.0149;
          27.6449,25.9601; 28,25.9203; 28.1551,25.903; 28.6449,25.8481; 29,
          25.8084; 29.1551,25.791; 29.6449,25.7362; 30,25.6965; 30.1551,25.6791;
          30.6449,25.6243; 31,25.5845; 31.1551,25.5672; 31.6449,25.5123; 32,
          25.4726; 32.1551,25.4552; 32.6449,25.4004; 33,25.3606; 33.1551,
          25.3433; 33.6449,25.2884; 34,25.2487; 34.1551,25.2313; 34.6449,
          25.1765; 35,25.1368; 35.1551,25.1194; 35.6449,25.0646; 36,25.0248;
          36.1551,25.0075; 36.6449,24.9526; 37,24.9129; 37.1551,24.8955;
          37.6449,24.8407; 38,24.8009; 38.1551,24.7836; 38.6449,24.7287; 39,
          24.689; 39.1551,24.6716; 39.6449,24.6168; 40,24.5771; 40.1551,24.5597;
          40.6449,24.5049; 41,24.4651; 41.1551,24.4478; 41.6449,24.3929; 42,
          24.3532; 42.1551,24.3358; 42.6449,24.281; 43,24.2412; 43.1551,24.2239;
          43.6449,24.169; 44,24.1293; 44.1551,24.1119; 44.6449,24.0571; 45,
          24.0174; 45.1551,24; 45.6449,23.9452; 46,23.9054; 46.1551,23.8881;
          46.6449,23.8332; 47,23.7935; 47.1551,23.7761; 47.6449,23.7213; 48,
          23.6815; 48.1551,23.6642; 48.6449,23.6093; 49,23.5696; 49.1551,
          23.5522; 49.6449,23.4974; 50,23.4577; 50.1551,23.4403; 50.6449,
          23.3855; 51,23.3457; 51.1551,23.3284; 51.6449,23.2735; 52,23.2338;
          52.1551,23.2164; 52.6449,23.1616; 53,23.1218; 53.1551,23.1045;
          53.6449,23.0496; 54,23.0099; 54.1551,22.9925; 54.6449,22.9377; 55,
          22.898; 55.1551,22.8806; 55.6449,22.8258; 56,22.786; 56.1551,22.7687;
          56.6449,22.7138; 57,22.6741; 57.1551,22.6627; 57.6449,22.5914; 58,
          22.5901; 58.1551,22.5901; 58.6449,22.5901; 59,22.5901; 59.1551,
          22.5901; 59.6449,22.5901; 60,22.5901; 60.1551,22.5901; 60.6449,
          22.5901; 61,22.5901; 61.1551,22.5901; 61.6449,22.5901; 62,22.5901;
          62.1551,22.5901; 62.6449,22.5901; 63,22.5901; 63.1551,22.5901;
          63.6449,22.5901; 64,22.5901; 64.1551,22.5901; 64.6449,22.5901; 65,
          22.5901; 65.1551,22.5901; 65.6449,22.5901; 66,22.5901; 66.1551,
          22.5901; 66.6449,22.5901; 67,22.5901; 67.1551,22.5901; 67.6449,
          22.5901; 68,22.5901; 68.1551,22.5901; 68.6449,22.5901; 69,22.5901;
          69.1551,22.5901; 69.6449,22.5901; 70,22.5901; 70.1551,22.5901;
          70.6449,22.5901; 71,22.5901; 71.1551,22.5901; 71.6449,22.5901; 72,
          22.5901; 72.1551,22.5901; 72.6449,22.5901; 73,22.5901; 73.1551,
          22.5901; 73.6449,22.5901; 74,22.5901; 74.1551,22.5901; 74.6449,
          22.5901; 75,22.5901; 75.1551,22.5901; 75.6449,22.5901; 76,22.5901;
          76.1551,22.5901; 76.6449,22.5901; 77,22.5936; 77.1551,22.5913;
          77.6449,22.5901; 78,22.5901; 78.1551,22.5901; 78.6449,22.5901; 79,
          22.5901; 79.1551,22.5901; 79.6449,22.5901; 80,22.5901; 80.1551,
          22.5901; 80.6449,22.5901; 81,22.5901; 81.1551,22.5901; 81.6449,
          22.5901; 82,22.5901; 82.1551,22.5901; 82.6449,22.5901; 83,22.5901;
          83.1551,22.5901; 83.6449,22.5901; 84,22.5901; 84.1551,22.5901;
          84.6449,22.5901; 85,22.5901; 85.1551,22.5901; 85.6449,22.5901; 86,
          22.5901; 86.1551,22.5901; 86.6449,22.5901; 87,22.5901; 87.1551,
          22.5901; 87.6449,22.5901; 88,22.5901; 88.1551,22.5901; 88.6449,
          22.5901; 89,22.5901; 89.1551,22.5901; 89.6449,22.5901; 90,22.5901;
          90.1551,22.5901; 90.6449,22.5901; 91,22.5901; 91.1551,22.5901;
          91.6449,22.5901; 92,22.5901; 92.1551,22.5901; 92.6449,22.5901; 93,
          22.5901; 93.1551,22.5901; 93.6449,22.5901; 94,22.5901; 94.1551,
          22.5901; 94.6449,22.5901; 95,22.5901; 95.1551,22.5901; 95.6449,
          22.5901; 96,22.5901; 96.1551,22.5901; 96.6449,22.5901; 97,22.5901;
          97.1551,22.5901; 97.6449,22.5901; 98,22.5901; 98.1551,22.5901;
          98.6449,22.5901; 99,22.5901; 99.1551,22.5901; 99.6449,22.5901; 100,
          22.5901; 100.155,22.5901; 100.645,22.5901; 101,22.5901; 101.155,
          22.5901; 101.645,22.5901; 102,22.5901; 102.155,22.5901; 102.645,
          22.5901; 103,22.5901; 103.155,22.5901; 103.645,22.5901; 104,22.5901;
          104.155,22.5901; 104.645,22.5901; 105,22.5901; 105.155,22.5901;
          105.645,22.5901; 106,22.5901; 106.155,22.5901; 106.645,22.5901; 107,
          22.5901; 107.155,22.5901; 107.645,22.5901; 108,22.5901; 108.155,
          22.5901; 108.645,22.5901; 109,22.5901; 109.155,22.5901; 109.645,
          22.5901; 110,22.5901; 110.155,22.5901; 110.645,22.5901; 111,22.5901;
          111.155,22.5901; 111.645,22.5901; 112,22.5901; 112.155,22.5901;
          112.645,22.5901; 113,22.5901; 113.155,22.5901; 113.645,22.5901; 114,
          22.5901; 114.155,22.5901; 114.645,22.5901; 115,22.5901; 115.155,
          22.5901; 115.645,22.5901; 116,22.5901; 116.155,22.5901; 116.645,
          22.5901; 117,22.5901; 117.155,22.5901; 117.645,22.5901; 118,22.5901;
          118.155,22.5901; 118.645,22.5901; 119,22.5901; 119.155,22.5901;
          119.645,22.5901; 120,22.5901; 120.155,22.5901; 120.645,22.5901; 121,
          22.5901; 121.155,22.5901; 121.645,22.5901; 122,22.5901; 122.155,
          22.5901; 122.645,22.5901; 123,22.5901; 123.155,22.5901; 123.645,
          22.5901; 124,22.5901; 124.155,22.5901; 124.645,22.5901; 125,22.5901;
          125.155,22.5901; 125.645,22.5901; 126,22.5901; 126.155,22.5901;
          126.645,22.5901; 127,22.5901; 127.155,22.5901; 127.645,22.5901; 128,
          22.5901; 128.155,22.5901; 128.645,22.5901; 129,22.5901; 129.155,
          22.5901; 129.645,22.5901; 130,22.5901; 130.155,22.5901; 130.645,
          22.5901; 131,22.5901; 131.155,22.5901; 131.645,22.5901; 132,22.5901;
          132.155,22.5901; 132.645,22.5901; 133,22.5901; 1000,22.01]) 
      annotation (extent=[-24,-84; -4,-64]);
    Modelica.Blocks.Sources.TimeTable Table_uB4(table=[0,0.011519; 0.155051,
          0.012343; 0.644949,0.015057; 1,0.017128; 1.15505,0.018041; 1.64495,
          0.020989; 2,0.02315; 2.15505,0.024091; 2.64495,0.027037; 3,0.029125;
          3.15505,0.030016; 3.64495,0.032735; 4,0.034599; 4.15505,0.035377;
          4.64495,0.037684; 5,0.039207; 5.15505,0.039824; 5.64495,0.041589; 6,
          0.04269; 6.15505,0.043115; 6.64495,0.044255; 7,0.044886; 7.15505,
          0.045102; 7.64495,0.045572; 8,0.045712; 8.15505,0.045715; 8.64495,
          0.045545; 9,0.045265; 9.15505,0.045116; 9.64495,0.044674; 10,0.044479;
          10.1551,0.044657; 10.6449,0.045252; 11,0.045812; 11.1551,0.045589;
          11.6449,0.045926; 12,0.046234; 12.1551,0.046249; 12.6449,0.046634; 13,
          0.046899; 13.1551,0.047029; 13.6449,0.047459; 14,0.047789; 14.1551,
          0.047943; 14.6449,0.048453; 15,0.048852; 15.1551,0.049035; 15.6449,
          0.049649; 16,0.050131; 16.1551,0.050352; 16.6449,0.051095; 17,
          0.051679; 17.1551,0.051948; 17.6449,0.052854; 18,0.05357; 18.1551,
          0.0539; 18.6449,0.055017; 19,0.055903; 19.1551,0.056313; 19.6449,
          0.057708; 20,0.058823; 20.1551,0.059341; 20.6449,0.061115; 21,
          0.062547; 21.1551,0.063217; 21.6449,0.065534; 22,0.067428; 22.1551,
          0.068324; 22.6449,0.071464; 23,0.074081; 23.1551,0.075339; 23.6449,
          0.079843; 24,0.083715; 24.1551,0.085607; 24.6449,0.0927; 25,0.098918;
          25.1551,0.101955; 25.6449,0.112858; 26,0.122468; 26.1551,0.127341;
          26.6449,0.146923; 27,0.167171; 27.1551,0.171373; 27.6449,0.186471; 28,
          0.197234; 28.1551,0.202209; 28.6449,0.217558; 29,0.228688; 29.1551,
          0.233511; 29.6449,0.248583; 30,0.259281; 30.1551,0.263858; 30.6449,
          0.277933; 31,0.287717; 31.1551,0.29185; 31.6449,0.304359; 32,0.312873;
          32.1551,0.316421; 32.6449,0.326983; 33,0.334013; 33.1551,0.336899;
          33.6449,0.345333; 34,0.350803; 34.1551,0.353008; 34.6449,0.359305; 35,
          0.36325; 35.1551,0.364798; 35.6449,0.369065; 36,0.371587; 36.1551,
          0.372527; 36.6449,0.374957; 37,0.376228; 37.1551,0.376659; 37.6449,
          0.377714; 38,0.378277; 38.1551,0.378563; 38.6449,0.380177; 39,
          0.382478; 39.1551,0.383416; 39.6449,0.385937; 40,0.387418; 40.1551,
          0.388297; 40.6449,0.390602; 41,0.392296; 41.1551,0.393023; 41.6449,
          0.395344; 42,0.397027; 42.1551,0.397762; 42.6449,0.400085; 43,
          0.401769; 43.1551,0.402504; 43.6449,0.404829; 44,0.406514; 44.1551,
          0.40725; 44.6449,0.409575; 45,0.411261; 45.1551,0.411998; 45.6449,
          0.414325; 46,0.416012; 46.1551,0.416749; 46.6449,0.419078; 47,
          0.420766; 47.1551,0.421503; 47.6449,0.423833; 48,0.425522; 48.1551,
          0.42626; 48.6449,0.428592; 49,0.430282; 49.1551,0.43102; 49.6449,
          0.433353; 50,0.435045; 50.1551,0.435784; 50.6449,0.438118; 51,
          0.439811; 51.1551,0.44055; 51.6449,0.442886; 52,0.44458; 52.1551,
          0.44532; 52.6449,0.447657; 53,0.449352; 53.1551,0.450093; 53.6449,
          0.452432; 54,0.454128; 54.1551,0.454869; 54.6449,0.45721; 55,0.458907;
          55.1551,0.459649; 55.6449,0.461992; 56,0.46369; 56.1551,0.464439;
          56.6449,0.466727; 57,0.468332; 57.1551,0.468716; 57.6449,0.470253; 58,
          0.4712; 58.1551,0.471648; 58.6449,0.472859; 59,0.473657; 59.1551,
          0.47398; 59.6449,0.474916; 60,0.475519; 60.1551,0.475756; 60.6449,
          0.476426; 61,0.476836; 61.1551,0.476988; 61.6449,0.477384; 62,
          0.477585; 62.1551,0.477621; 62.6449,0.477858; 63,0.478132; 63.1551,
          0.478302; 63.6449,0.478728; 64,0.478961; 64.1551,0.479096; 64.6449,
          0.479471; 65,0.479736; 65.1551,0.479858; 65.6449,0.480232; 66,
          0.480505; 66.1551,0.480624; 66.6449,0.481005; 67,0.481282; 67.1551,
          0.481403; 67.6449,0.48179; 68,0.482072; 68.1551,0.482195; 68.6449,
          0.482588; 69,0.482874; 69.1551,0.482999; 69.6449,0.483396; 70,
          0.483684; 70.1551,0.483811; 70.6449,0.484214; 71,0.48451; 71.1551,
          0.484638; 71.6449,0.485045; 72,0.48534; 72.1551,0.485468; 72.6449,
          0.485877; 73,0.486176; 73.1551,0.486306; 73.6449,0.486717; 74,
          0.487017; 74.1551,0.487148; 74.6449,0.487562; 75,0.487862; 75.1551,
          0.487994; 75.6449,0.488408; 76,0.488707; 76.1551,0.48885; 76.6449,
          0.489255; 77,0.489482; 77.1551,0.489492; 77.6449,0.489616; 78,
          0.489727; 78.1551,0.48978; 78.6449,0.489944; 79,0.490047; 79.1551,
          0.490084; 79.6449,0.490185; 80,0.49024; 80.1551,0.490259; 80.6449,
          0.490301; 81,0.490314; 81.1551,0.490316; 81.6449,0.490305; 82,
          0.490284; 82.1551,0.49027; 82.6449,0.490218; 83,0.490169; 83.1551,
          0.490147; 83.6449,0.490073; 84,0.490021; 84.1551,0.490003; 84.6449,
          0.489936; 85,0.489878; 85.1551,0.489849; 85.6449,0.489767; 86,
          0.489711; 86.1551,0.489683; 86.6449,0.489605; 87,0.48955; 87.1551,
          0.489526; 87.6449,0.489457; 88,0.489409; 88.1551,0.48939; 88.6449,
          0.489331; 89,0.489293; 89.1551,0.489277; 89.6449,0.489231; 90,
          0.489202; 90.1551,0.48919; 90.6449,0.489156; 91,0.489134; 91.1551,
          0.489125; 91.6449,0.4891; 92,0.489085; 92.1551,0.489079; 92.6449,
          0.489061; 93,0.489049; 93.1551,0.489045; 93.6449,0.489031; 94,
          0.489023; 94.1551,0.489016; 94.6449,0.488998; 95,0.488983; 95.1551,
          0.488977; 95.6449,0.488957; 96,0.488941; 96.1551,0.488934; 96.6449,
          0.488909; 97,0.48889; 97.1551,0.488881; 97.6449,0.488851; 98,0.488828;
          98.1551,0.488818; 98.6449,0.488786; 99,0.488764; 99.1551,0.488757;
          99.6449,0.488736; 100,0.488722; 100.155,0.488713; 100.645,0.488693;
          101,0.48868; 101.155,0.488674; 101.645,0.488657; 102,0.488647;
          102.155,0.488642; 102.645,0.48863; 103,0.488622; 103.155,0.488619;
          103.645,0.488611; 104,0.488606; 104.155,0.488604; 104.645,0.488601;
          105,0.488599; 105.155,0.488599; 105.645,0.488599; 106,0.488599;
          106.155,0.4886; 106.645,0.488603; 107,0.488606; 107.155,0.488608;
          107.645,0.488614; 108,0.488619; 108.155,0.488621; 108.645,0.48863;
          109,0.488636; 109.155,0.488639; 109.645,0.488649; 110,0.488657;
          110.155,0.48866; 110.645,0.488671; 111,0.48868; 111.155,0.488683;
          111.645,0.488695; 112,0.488703; 112.155,0.488707; 112.645,0.488718;
          113,0.488727; 113.155,0.48873; 113.645,0.488741; 114,0.488749;
          114.155,0.488752; 114.645,0.488762; 115,0.488769; 115.155,0.488772;
          115.645,0.488781; 116,0.488786; 116.155,0.488789; 116.645,0.488796;
          117,0.488801; 117.155,0.488803; 117.645,0.488808; 118,0.488811;
          118.155,0.488813; 118.645,0.488817; 119,0.488819; 119.155,0.48882;
          119.645,0.488822; 120,0.488823; 120.155,0.488823; 120.645,0.488823;
          121,0.488823; 121.155,0.488823; 121.645,0.488822; 122,0.488821;
          122.155,0.48882; 122.645,0.488818; 123,0.488816; 123.155,0.488815;
          123.645,0.488811; 124,0.488809; 124.155,0.488808; 124.645,0.488803;
          125,0.4888; 125.155,0.488799; 125.645,0.488794; 126,0.488791; 126.155,
          0.488789; 126.645,0.488785; 127,0.488781; 127.155,0.48878; 127.645,
          0.488775; 128,0.488772; 128.155,0.488771; 128.645,0.488767; 129,
          0.488764; 129.155,0.488763; 129.645,0.48876; 130,0.488758; 130.155,
          0.488757; 130.645,0.488756; 131,0.488755; 131.155,0.488754; 131.645,
          0.488755; 132,0.488755; 132.155,0.488756; 132.645,0.488758; 133,
          0.48876; 1000,0.48876]) 
                     annotation (extent=[-20,-48; 0,-28]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_3_mode_3(table=[0,0.4; 30,
          0.4; 60,0.5; 1000,0.5]) 
                     annotation (extent=[6,-82; 26,-62]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_3_mode_3(table=[0,0; 50,
          0.40; 200,0.40]) 
                annotation (extent=[32,-78; 52,-58]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_3_mode_3(table=[0,(293)/
          13.41; 50,(60 + 273)/13.41; 1000,(60 + 273)/13.41]) 
      annotation (extent=[12,-48; 32,-28]);
    Modelica.Blocks.Sources.Constant const(k=0) 
      annotation (extent=[10,62; 30,82]);
    Modelica.Blocks.Sources.Constant const1(k=0) 
      annotation (extent=[-56,70; -36,90]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_1_mode_1(table=[0,(25 +
          293)/13.41; 70,(60 + 273)/13.41; 1000,(60 + 273)/13.41]) 
      annotation (extent=[-94,-16; -74,0]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_1_mode_1(table=[0,0; 30,
          0.3; 60,0.45; 1000,0.45]) 
                     annotation (extent=[-96,42; -76,62]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed_case_1_mode_1(table=[0,335/
          13.41; 30,335/13.41; 70,303/13.41; 1000,303/13.41]) 
      annotation (extent=[-94,12; -76,30]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_1_mode_1(table=[0,0; 30,0;
          60,0; 1000,0]) 
                     annotation (extent=[-94,72; -74,90]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed_case_1_mode_3(table=[0,303/
          13.41; 1000,303/13.41]) 
      annotation (extent=[72,14; 92,34]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_1_mode_3(table=[0,0.477;
          300,0.477]) 
                     annotation (extent=[76,52; 96,72]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_1_mode_3(table=[0,0; 70,
          0.45; 200,0.45]) 
                annotation (extent=[76,82; 96,102]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_1_mode_3(table=[0,(327)/
          13.41; 30,(327)/13.41; 60,317/13.41; 1000,317/13.41]) 
      annotation (extent=[70,-26; 90,-6]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed_case_1_mode_2(table=[0,312/
          13.4; 25,333/13.4; 50,303/13.4; 200,303/13.4]) 
      annotation (extent=[-88,-66; -68,-46]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_1_mode_2(table=[0,0; 50,
          0.45; 200,0.45]) 
                     annotation (extent=[-68,-92; -48,-72]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_1_mode_2(table=[0,0; 100,0]) 
                annotation (extent=[-66,-68; -46,-48]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_1_mode_2(table=[0,295/
          13.4; 60,335/13.4; 200,335/13.4]) 
      annotation (extent=[-88,-94; -68,-74]);
    Modelica.Blocks.Sources.TimeTable Table_Tfeed_case_1_mode_4(table=[0,303/
          13.41; 1000,303/13.41]) 
      annotation (extent=[32,22; 52,42]);
    Modelica.Blocks.Sources.TimeTable Table_uB1_case_1_mode_4(table=[0,0.4875;
          300,0.4875]) 
                     annotation (extent=[36,60; 56,80]);
    Modelica.Blocks.Sources.TimeTable Table_uB2_case_1_mode_4(table=[0,0; 70,
          0.45; 200,0.45]) 
                annotation (extent=[36,90; 56,110]);
    Modelica.Blocks.Sources.TimeTable Table_Tcool_case_1_mode_4(table=[0,(305)/
          13.41; 30,(325)/13.41; 60,317/13.41; 1000,317/13.41]) 
      annotation (extent=[30,-18; 50,2]);
  equation 
    connect(pr.u_T_cool_setpoint, Table_Tcool.y) annotation (points=[-11.8,10.4;
          -36.9,10.4; -36.9,-10; -29,-10],
                                         style(color=74, rgbcolor={0,0,127}));
    connect(pr.u_TfeedA_setpoint, Table_Tfeed.y) annotation (points=[-11.8,17;
          -36.9,17; -36.9,22; -33,22], style(color=74, rgbcolor={0,0,127}));
    connect(pr.u_B1_setpoint, Table_uB1.y) annotation (points=[-8.8,22.2; -8.8,
          37.1; -31,37.1; -31,52], style(color=74, rgbcolor={0,0,127}));
    connect(pr.u_B2_setpoint, Table_uB2.y) annotation (points=[-3.6,22.2; -3.6,
          49.1; 5,49.1; 5,76], style(color=74, rgbcolor={0,0,127}));
  end platereactor_eval;
  
end PR_models;
